<?php

use yii\db\Migration;

class m161022_081027_create_school extends Migration
{
    public function up()
    {
        $this->createTable('kd_school',[
            'yey_id'=>$this->primaryKey()->comment('幼儿园序号'),
            'yey_mingcheng'=>$this->string(100)->notNull()->comment('名称'),

            'yey_type'=>$this->string(10)->notNull()->comment('1 正式 2 使用'),
            'yey_www'=>$this->string(100)->null()->comment('网址'),
            'stu_num'=>$this->string(100)->notNull()->comment('学生总数'),




            'yey_sheng'=>$this->string(20)->notNull()->comment('省'),
            'yey_shi'=>$this->string(20)->notNull()->comment('市'),

            'yz_name'=>$this->string(20)->notNull()->comment('园长姓名'),

            'yz_phone'=>$this->string(20)->notNull()->comment('园长手机号'),


            'gl_name'=>$this->string(20)->null()->comment('管理姓名'),
            'gl_phone'=>$this->string(20)->null()->comment('管理手机号'),

            'yey_xz'=>$this->string(20)->notNull()->comment('幼儿园性质'),

            'yey_jg'=>$this->integer(11)->null()->comment('所属机构'),

            'yey_jianjie'=>$this->text(3000)->notNull()->comment('简介'),
            'add_shijian'=>$this->dateTime(50)->notNull()->comment('添加时间'),
            'xiugai_shijian'=>$this->dateTime(50)->comment('最后修改时间'),
            'xiugai_ren'=>$this->string(50)->comment('修改人'),
            ]);

    }

    public function down()
    {
        $this->dropTable('kd_school');
    }

    /*
    // Use safeUp/safeDown to run migration code within a transaction
    public function safeUp()
    {
    }

    public function safeDown()
    {
    }
    */
}
